<?php

/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;
use yii\helpers\Url;
AppAsset::register($this);
?>

<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?= Html::csrfMetaTags() ?>
    <title>分销管理系统</title>
    <?php $this->head() ?>
</head>

<style type="text/css">
    .centertext{
        text-align: left;
    }
    .menuitem{
        color: #373737;
        font-size: 16px;
    }

</style>

<body>
<?php $this->beginBody() ?>


<?php
        NavBar::begin([
            'brandLabel' => '分销管理系统',
            'brandUrl' => ['index.php/publish/index'],
            'options' => [
                 'class' => 'navbar-inverse navbar-fixed-top',
          ],
        ]);

        $loginOutItem = [
            ['label' => '退出登录',
            'options'=>['id'=>'loginOut']],
        ];

        echo Nav::widget([
            'options' => ['class' => 'navbar-nav navbar-right'],
            'items' => $loginOutItem,
        ]);

        NavBar::end();
?>
<div style="min-width: 1000px;width: 100%;height: 100%">


<div style="float: left; width: 10%;height: 500px;padding-top: 80px;padding-left: 20px;">
    <div style="width: 150px;">
        <div class="panel-group" id="accordion2">

            <!-- 商品管理 section1 menuitemid 11 22 23 24 25-->
            <div class="panel panel-default">
                <div class="panel-heading" data-toggle="collapse"
                     data-parent="#accordion1" href="#collapseOne">
                    <label class="accordion-toggle menuitem">店铺管理</label>
                </div>
                <div id="collapseOne" class="<?php if($this->params['menuitemid'] > 10 && $this->params['menuitemid'] < 20 ){echo 'panel-collapse in';}else{echo 'panel-collapse collapse';} ?>"
                     style="height: <?php if($this->params['menuitemid'] > 10 && $this->params['menuitemid'] < 20 ){echo 'auto';}else{echo '0px';} ?>;">
                    <div class="panel-body centertext">
                        <ul class="nav nav-pills nav-stacked">
                            <li class="<?php if($this->params['menuitemid'] == 11){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/shop/index'); ?>">店铺设置</a></li>
                        </ul>
                    </div>
                </div>
            </div>

<!--            商品管理 section2 menuitemid 21 22 23 24 25-->
            <div class="panel panel-default">
                <div class="panel-heading" data-toggle="collapse"
                     data-parent="#accordion2" href="#collapseTwo">
                    <label class="accordion-toggle menuitem">商品管理</label>
                </div>
                <div id="collapseTwo" class="<?php if($this->params['menuitemid'] > 20 && $this->params['menuitemid'] < 30 ){echo 'panel-collapse in';}else{echo 'panel-collapse collapse';} ?>"
                     style="height: <?php if($this->params['menuitemid'] > 20 && $this->params['menuitemid'] < 30 ){echo 'auto';}else{echo '0px';} ?>;">
                    <div class="panel-body centertext">
                        <ul class="nav nav-pills nav-stacked">
                            <li class="<?php if($this->params['menuitemid'] == 21){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/publish/index'); ?>">发布商品</a></li>
                            <li class="<?php if($this->params['menuitemid'] == 22){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/auctionlist/index'); ?>">出售中的商品</a></li>
                            <li class="<?php if($this->params['menuitemid'] == 23){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/auctionlist/warehouse'); ?>">未上架的商品</a></li>
                            <li class="<?php if($this->params['menuitemid'] == 24){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/auctionlist/category'); ?>">商品分类管理</a></li>
                            <li class="<?php if($this->params['menuitemid'] == 25){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/postage-template/index'); ?>">运费模板管理</a></li>
                        </ul>
                    </div>
                </div>
            </div>
<!--            订单管理 section3 menuitemid 31 32-->
            <div class="panel panel-default">
                <div class="panel-heading" data-toggle="collapse"
                     data-parent="#accordion2" href="#collapseThree">
                    <label class="accordion-toggle menuitem">订单管理</label>
                </div>
                <div id="collapseThree" class="<?php if($this->params['menuitemid'] > 30 && $this->params['menuitemid'] < 40 ){echo 'panel-collapse in';}else{echo 'panel-collapse collapse';} ?>"
                     style="height: <?php if($this->params['menuitemid'] > 30 && $this->params['menuitemid'] < 40 ){echo 'auto';}else{echo '0px';} ?>;">
                    <div class="panel-body centertext">
                        <ul class="nav nav-pills nav-stacked">
                            <li class="<?php if($this->params['menuitemid'] == 31){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/orderform/index'); ?>">订单列表</a></li>
<!--                            <li class="--><?php //if($this->params['menuitemid'] == 32){echo 'active';} ?><!--"><a href="#">评价管理</a></li>-->
                        </ul>
                    </div>
                </div>
            </div>
<!--            佣金管理 section4 menuitemid 41 42 43-->
            <div class="panel panel-default">
                <div class="panel-heading" data-toggle="collapse"
                     data-parent="#accordion2" href="#collapseFour">
                    <label class="accordion-toggle menuitem">佣金管理</label>
                </div>
                <div id="collapseFour" class="<?php if($this->params['menuitemid'] > 40 && $this->params['menuitemid'] < 50 ){echo 'panel-collapse in';}else{echo 'panel-collapse collapse';} ?>"
                     style="height: <?php if($this->params['menuitemid'] > 40 && $this->params['menuitemid'] < 50 ){echo 'auto';}else{echo '0px';} ?>;">
                    <div class="panel-body centertext">
                        <ul class="nav nav-pills nav-stacked">
                            <li class="<?php if($this->params['menuitemid'] == 41){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/commission/set-commission'); ?>">佣金设置</a></li>
                            <li class="<?php if($this->params['menuitemid'] == 42){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/commission/strikeallcommission'); ?>">佣金结算</a>
                            <li class="<?php if($this->params['menuitemid'] == 43){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/commission/strike-commission'); ?>">佣金细节</a></li>
                        </ul>
                    </div>
                </div>
            </div>
<!--            代理管理 section6 menuitemid 61 62 63-->
            <div class="panel panel-default">
                <div class="panel-heading" data-toggle="collapse"
                     data-parent="#accordion2" href="#collapseFive">
                    <label class="accordion-toggle menuitem">代理管理</label>
                </div>
                <div id="collapseFive" class="<?php if($this->params['menuitemid'] > 50 && $this->params['menuitemid'] < 60 ){echo 'panel-collapse in';}else{echo 'panel-collapse collapse';} ?>"
                     style="height: <?php if($this->params['menuitemid'] > 50 && $this->params['menuitemid'] < 60 ){echo 'auto';}else{echo '0px';} ?>">
                    <div class="panel-body centertext">
                        <ul class="nav nav-pills nav-stacked">
                            <li class="<?php if($this->params['menuitemid'] == 51){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/agent/check-agent'); ?>">代理审批</a></li>
                            <li class="<?php if($this->params['menuitemid'] == 52){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/agent/agent-list'); ?>">代理管理</a></li>
                        </ul>
                    </div>
                </div>
            </div>

            <!--            轮播图管理 section7 menuitemid 61 62 63-->
            <div class="panel panel-default">
                <div class="panel-heading" data-toggle="collapse"
                     data-parent="#accordion2" href="#collapseSix">
                    <label class="accordion-toggle menuitem">轮播图管理</label>
                </div>
                <div id="collapseSix" class="<?php if($this->params['menuitemid'] > 60 && $this->params['menuitemid'] < 70 ){echo 'panel-collapse in';}else{echo 'panel-collapse collapse';} ?>"
                     style="height: <?php if($this->params['menuitemid'] > 60 && $this->params['menuitemid'] < 70 ){echo 'auto';}else{echo '0px';} ?>">
                    <div class="panel-body centertext">
                        <ul class="nav nav-pills nav-stacked">
                            <li class="<?php if($this->params['menuitemid'] == 61){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/banner/index'); ?>">轮播图列表</a></li>
                        </ul>
                    </div>
                </div>
            </div>

            <!--            分享推广管理 section7 menuitemid 61 62 63-->
            <div class="panel panel-default">
                <div class="panel-heading" data-toggle="collapse"
                     data-parent="#accordion2" href="#collapseSeven">
                    <label class="accordion-toggle menuitem">推广管理</label>
                </div>
                <div id="collapseSeven" class="<?php if($this->params['menuitemid'] > 70 && $this->params['menuitemid'] < 80 ){echo 'panel-collapse in';}else{echo 'panel-collapse collapse';} ?>"
                     style="height: <?php if($this->params['menuitemid'] > 70 && $this->params['menuitemid'] < 80 ){echo 'auto';}else{echo '0px';} ?>">
                    <div class="panel-body centertext">
                        <ul class="nav nav-pills nav-stacked">
                            <li class="<?php if($this->params['menuitemid'] == 71){echo 'active';} ?>"><a href="<?php echo Url::toRoute('index.php/popularize/index'); ?>">分享推广</a></li>
                        </ul>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

<div style="float: left;width: 80%;margin-left: 6%;margin-top:80px">


    <?= $content ?>


</div>

</div>

<script>
    $('body').on('click','#loginOut',function() {

        $('#loginOutModal').modal();

    });

</script>

<div class="modal fade" id="loginOutModal">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">确定退出登录</h4>
            </div>
            <div class="modal-body">
                <p>退出登录后需要重新登录操作</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <a type="button" class="btn btn-primary" href="../login/logout">确定</a>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->


<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
